<template>
  <el-carousel :interval="4000" type="card" height="200px">
    <el-carousel-item v-for="(item, index) in img" :key="index">
      <!-- <h3 class="medium">{{ item }}</h3> -->
      <div class="tu">
        <el-image
          style="width: 100%; height: 100%"
          :src="item.img"
          fit="fit"
        ></el-image>
      </div>
    </el-carousel-item>
  </el-carousel>
</template>

<script>
export default {
  props: ["datas"],
  data() {
    return {
      img: [],
    };
  },
  created() {
    this.img = this.datas;
    // console.log(this.img);
  },
  methods: {},
};
</script>

<style lang="less" scoped>
.el-carousel__item {
  border-radius: 5px;
  .tu {
    width: 100%;
    height: 100%;
  }
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}
/deep/.el-carousel__container {
  min-width: 50%;
}
/deep/.el-carousel__button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
/deep/ .is-active .el-carousel__button {
  // 指示器**按钮
  background: #da6268;
}
</style>